﻿<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <jsp:include page="/common.jsp"></jsp:include>
</head>

<body class="navbar-top">
<div class="modal-shiftfix">
    <jsp:include page="/menu.jsp"></jsp:include>
    <div class="container-fluid main-content">
        <div class="row">
            <div class="col-md-7 col-sm-7">
                <div class="widget-container fluid-height clearfix">
                    <div class="heading clearfix">
                        <i class="icon-reorder"></i> 任务详情
                        <a href="javascript:;" class="pull-right" onclick="history.go(-1);"><i
                                class="icon-reply"></i></a>
                    </div>
                    <div class="widget-content padded clearfix">
                        <div class="search-header">
                            <a class="h4 inline-block">${dailyRecord.title}</a>

                            <div class="text-muted"><a class="weiBoxs-dialog" href="manage/ajax-info.html?manage_id=1"
                                                       dialog-title="管理员信息" dialog-button="false">${dailyRecord.creator.employeeName}</a> : ${dailyRecord.createTime}
                                 评论(${dailyRecord.commentList.size()})
                            </div>
                        </div>
                        <p class="m-top-sm">

                        <p>${dailyRecord.content}</p>
                        </p>
                    </div>
                </div>
            </div>
            <div class="col-md-5 col-sm-5">
                <div class="widget-container fluid-height clearfix list rating-widget">
                    <div class="heading clearfix">日志评论</div>
                    <div class="widget-content padded clearfix">
                        <form method="post" id="comment_form" action="${pageContext.request.contextPath}/DailyRecordServlet?method=addComment">
                            <p class="m-top-sm">
                                <textarea rows="2" class="form-control" name="detail" id="content"
                                          placeholder="评论内容"></textarea>
                                <input type="hidden" name="recordId" value="${dailyRecord.recordId}">
                                <input type="hidden" name="ownerId" value="1">
                                <input type="hidden" name="comment_type" value="10"></p>
                            <button class="btn btn-sm btn-primary margin-top-10" type="submit">提交</button>
                        </form>
                    </div>
                    <div id="tasks-list" data-pjax-container="" data-pjax-push-state data-pjax-timeout="1000">
                        <ul>
                            <c:forEach items="${dailyRecord.commentList}" var="comment" >
                            <li>
                                <div class="reviewer-info">
                                    <div class="star-rating pull-right">
                                        <a class="btn-delete-communicate" href="communicate/delete.html?id=6"
                                           onclick=""><i class="fa fa-trash-o"></i> 删除</a>
                                    </div>
                                    <img width="30" height="30" src="${pageContext.request.contextPath }/picture/1_avatar_middle.jpg">${comment.commentEmployee.employeeName}<em>${comment.createTime}</em>
                                </div>
                                <div class="review-text">
                                    <p>${comment.detail}</p>
                                </div>
                            </li>
                            </c:forEach>
                        </ul>
                        <div class="text-right" style="margin: 10px;"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>


</html>
